
// 获取列表
export const getList = (axios, params) => {
	return axios({
		url: '/common/supplyDemand/list',
		method: 'get',
		params: params,
		// headers: {
		// 	isToken: false,
		// },
	});
}

// 获取详情
export const getDetail = (axios, id) => {
	return axios({
		url: `/common/supplyDemand/${id}`,
		method: 'get',
		params: {},
		// headers: {
		// 	isToken: false,
		// },
	});
}

// 获取修改详情
export const getEditDetail = (axios, id) => {
	return axios({
		url: `/supplyDemand/${id}`,
		method: 'get',
		params: {},
	});
}


// 需求认领
export const getCollect = (axios, supplyDemandId) => {
   return axios({
   	url: `/supplyDemand/collect/${supplyDemandId}`,
   	method: 'post',
   	params:{},
   });
}

// 发布需求
export const publish = (axios, data) => {
	return axios({
		url: `/supplyDemand`,
		method: 'post',
		data: data,
	});
}



// 获取产品分类
export const getProductCategory = (axios) => {
	return axios({
		url: `/common/productCategory/treeselect`,
		method: 'get',
		params: {},
	});
}



// 获取发布列表
export const getListPublish = (axios, params) => {
	return axios({
		url: '/supplyDemand/list',
		method: 'get',
		params: params,
	});
}




// 我的认领列表
export const getMyList = (axios, params) => {
	return axios({
		url: `/member/collectSupplyDemandList`,
		method: 'get',
		params: params,
	});
}

// 修改需求
export const edit = (axios, data) => {
	return axios({
		url: `/supplyDemand`,
		method: 'put',
		data: data,
	});
}

















